package com.wsd.dao;

import com.wsd.domain.LoanLimit;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface  LoanLimitMapper {
    int deleteByPrimaryKey(Long id);

    int insert(LoanLimit record);

    int insertSelective(LoanLimit record);

    LoanLimit selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(LoanLimit record);

    int updateByPrimaryKey(LoanLimit record);

    /**
     * 根据客户编号查找最高额度
     *
     * @param customerId
     * @return
     */
    LoanLimit selectByCustomerId(@Param("customerId") Long customerId);

    /**
     * 用于批量审核用户额度
     *根据申请状态查找用户列表
     * @param limitStatus 用户额度状态
     * @return 用户额度信息类列表
     * by WangYuCan
     */
    List<LoanLimit> selectByLimitStatus(String limitStatus);

    /**
     * 批量更新用户用户额度信息
     * @param loanLimits 用户额度信息列表
     * @return 更新记录条数
     */
    int updateLoanLimitsByList(List<LoanLimit> loanLimits);
}